package com.norbitltd.guavaleaves.java.lang;

import com.google.common.base.Function;

public class ThrowableFunctions {

	public static Function<Throwable, String> getMessage() {
		return new Function<Throwable, String>() {
			public String apply(Throwable input) {
				return input.getMessage();
			}
		};
	}
	
	public static Function<Throwable, String> getLocalizedMessage() {
		return new Function<Throwable, String>() {
			public String apply(Throwable input) {
				return input.getLocalizedMessage();
			}
		};
	}
}
